Android Application Development with Maven by Papapetrou Patroklos & LALOU Jonathan

Android Application Development with Maven by Papapetrou Patroklos & LALOU Jonathan

Author:Papapetrou, Patroklos & LALOU, Jonathan [Papapetrou, Patroklos]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2015-03-19T04:00:00+00:00


Tip

Please make sure that the emulator/device screen you will use to run Robotium tests is unlocked; otherwise, you will receive an error during execution. If you haven't compiled the parent project so far, you can run the following Maven command on the root folder:

mvn clean package

The output is expected to be the same with the one we saw when running instrumentation tests using Android's testing framework.

UI Tests made easy with Selendroid

So far, we examined frameworks and tools that focus on Android components such as activities, services, intents, and so on. This is, with no doubt, very useful, but one of the key factors for a successful mobile application is a bug-free UI. In this section, we will discuss one of the most popular—and easy to use with Maven—tools for UI: Selendroid (http://selendroid.io/). One might argue that Selendroid is not the only available options for Android UI Testing, and this is absolutely true. It is a highly emerging field, but at the time of writing the book we had to pick only one of them due to the limited number of pages. We made our choice based on the level of integration with Maven, the maturity, stability, and the easiness of writing test cases.

Selendroid is a testing framework for native, hybrid, and mobile web applications based on Selenium, the most popular web UI testing framework. To use Selendroid, you should have a basic knowledge of Selenium because the tests are written using the Selenium 2 Client API. You can run Selendroid tests against emulators or real devices connected to the machine that runs the Selenium Client. In the remaining part of this section, we will show you how to configure Maven, then we will explore a basic Selendroid test case for our application, and finally we will see how to run the test using Maven.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.